package com.mayikt;

import java.util.concurrent.locks.LockSupport;

/**
 * @ClassName Test011
 * @Author 蚂蚁课堂余胜军 QQ644064779 www.mayikt.com
 * @Version V1.0
 **/
public class Test011 {
    public static void main(String[] args) {
//        System.out.println("begin");
//        LockSupport.park();
//        System.out.println("begin");

        Thread thread = new Thread(() -> {
            System.out.println("begin park");
            LockSupport.park();
            System.out.println(Thread.currentThread().isInterrupted());
            System.out.println("end park");
        });
        thread.start();
        try {
            Thread.sleep(1000);
        } catch (Exception e) {

        }
        thread.interrupt();
//        System.out.println("end unpark");
//        LockSupport.unpark(thread);

    }
}
